<!doctype html>
<html ⚡ lang="{{ .Site.LanguageCode }}" [class]="darkMode ? 'dark-mode' : ''">
  <head>
    <meta charset="utf-8" />
    <script async src="https://cdn.ampproject.org/v0.js"></script>
    <script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
    <script async custom-element="amp-sidebar" src="https://cdn.ampproject.org/v0/amp-sidebar-0.1.js"></script>
    <script async custom-element="amp-bind" src="https://cdn.ampproject.org/v0/amp-bind-0.1.js"></script>
    <script async custom-element="amp-youtube" src="https://cdn.ampproject.org/v0/amp-youtube-0.1.js"></script>

    <!-- Script for publisher using Google Adsense -->
    {{ if .Site.Params.adsensePublisher }}
      <script async custom-element="amp-ad" src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"></script>
      {{ if .Site.Params.adsenseSlotSticky }}
        <script async custom-element="amp-sticky-ad" src="https://cdn.ampproject.org/v0/amp-sticky-ad-1.0.js"></script>
      {{ end }}
    {{ end }}

    <!-- Page Title -->
    <title>
      {{- block "title" . -}}
        {{ if eq .Kind "page" }}{{ .Title }}{{ else if isset .Site.Params "seotitle" }}{{ .Site.Params.seotitle }}{{ else }}{{ .Site.Title }}{{ end }}
      {{- end -}}
    </title>

    <!-- Shared Head -->
    {{ partial "head.html" . }}
  </head>
  <body class="wrapper">
    {{ partial "svg-icons.html" . }}
    {{ partial "header.html" . }}
    {{ partial "sidebar.html" . }}
    {{ block "main" . }}{{ end }}
    {{ partial "footer.html" . }}
  </body>
</html>
